// 导入验证规则的包
const joi = require('joi');
// 定义id的验证规则
const id = joi.number().integer().min(1).required();
// 验证更改文章数据id验证规则
const title = joi.string().required();
const content = joi.string().required();
const cover_img = joi.string();
const pub_date = joi.string();
const state = joi.string().required();
const cate_id = joi.string().required();
const author_id = joi.string().required();
// TODO： 验证新增文章数据
exports.newdata_cate_schema = {
    body: {
        title,
        content,
        cover_img,
        pub_date,
        state,
        cate_id,
        author_id
    }
};
// TODO: 验证删除文章数据id
exports.datecate_cate_schema = {
    body: {
        Id: id
    }
};
// TODO: 验证查询文章数据id
exports.query_cate_schema = {
    body: {
        Id: id
    }
};
// TODO: 验证更改文章数据id
exports.update_cate_schema = {
    body: {
        Id: id,
        title,
        content,
        cover_img,
        pub_date,
        state,
        cate_id,
        author_id
    }
};